package com.xy.designPatterns.chainOfResponsibility;

public class HandlerTest {

    public static void main(String[] args) {
        AdHandler adHandler = new AdHandler();
        ProhibitedContentHandler prohibitedContentHandler = new ProhibitedContentHandler();
        DefaultHandler defaultHandler = new DefaultHandler();

        //编排审核对象
        adHandler.setNext(prohibitedContentHandler);
        prohibitedContentHandler.setNext(defaultHandler);

        Article article = new Article();
        adHandler.handle(article);
    }
}
